-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added description for build options. #886
Conversation
…unnecessary descr in cmake. Fixed duplicated enable-unittests
README.md
Outdated
@@ -41,6 +41,8 @@ As audio/video packets are streamed from a source to a destination device, SRT d | |||
* OpenSSL | |||
* Pthreads (for POSIX systems it's builtin, for Windows there's a library) | |||
|
|||
For detailed description of the build system and options, please [read here](BuildOptions.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For detailed description of the build system and options, please [read here](BuildOptions.md). | |
For detailed description of the build system and options, please [read](BuildOptions.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "read this"?
docs/BuildOptions.md
Outdated
source IP address exactly the same as the one, which the peer is trying to | ||
connect to. | ||
|
||
When this is OFF, the source IP address in such outgoing UDP packet will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ethouris Shouldn't this be "ON"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this exactly describes what happens by default. But as you are mistaken here, users will be as well, so it likely needs to be said explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review of BuildOptions.md
I made fixes mostly in the form you provided; here is my extra description of places where my checked-in version differs. @stevomatthews Please review, serveral things may still need fixing because of that. |
docs/BuildOptions.md
Outdated
time, instead of `gettimeofday`. This function forces the use of a monotonic | ||
clock that is independent of the currently set time in the system. | ||
The condition variables, for which the `*_timedwait()` functions are used | ||
with time specification basing on the time obtained from `clock_gettime` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with time specification based on the time obtained from clock_gettime
,
docs/BuildOptions.md
Outdated
`clock_gettime()` function, which is not available on every SDK, or extra | ||
time, instead of `gettimeofday`. This function forces the use of a monotonic | ||
clock that is independent of the currently set time in the system. | ||
The condition variables, for which the `*_timedwait()` functions are used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition variables (CV), for which the *_timedwait()
functions are used
docs/BuildOptions.md
Outdated
must be appropriately configured. For now, this is only done for the | ||
GarbageCollector controlling CV, not every CV used in SRT. The consequence | ||
of enabling this option, however, may be portability issues resulting from | ||
the fact that `clock_gettime` function may be unavailable in some SDKs or an extra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fact that clock_gettime
function may be unavailable in some SDKs, or that an extra
must be appropriately configured. For now, this is only done for the | ||
GarbageCollector controlling CV, not every CV used in SRT. The consequence | ||
of enabling this option, however, may be portability issues resulting from | ||
the fact that `clock_gettime` function may be unavailable in some SDKs or an extra | ||
`-lrt` option is sometimes required (this requirement will be autodetected). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding this (edited) paragraph from your comments:
What is important here is that the clock_gettime
function is used to obtain
the current time, and then the *_timedwait
functions need to be passed the
time specification from the same domain. The time must be specified to the
*_timedwait
functions as the absolute time up to which they have to wait.
This means that usually you first obtain the current time from clock_gettime
,
add the "waiting time" to it, and then pass the result to the *_timedwait
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll try to provide the description a little bit more concise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this:
The problem is based on the fact that POSIX functions that use timeout
specification (all of *_timedwait
) expect the absolute time value.
A relative timeout value can be then only specified by adding it to
the current time, which can be specified as either system or monotonic
clock (which one, is configured in the resources used in the operation).
However the current time of the monotonic clock can only be obtained by
the clock_gettime
function.
docs/BuildOptions.md
Outdated
directory, provided that the library and applications are installed in POSIX/GNU | ||
style directories. This might be useful when installing SRT and applications | ||
in a directory, in which the library subdirectory is not explicitly defined | ||
among the global library paths (such as `/opt/srt-1.4/lib`, for example). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
among the global library paths. Consider, for example, this application and its
required library:
/opt/srt/bin/srt-live-transmit
/opt/srt/lib64/libsrt.so
By using the --enable-relative-libpath
option, the srt-live-transmit
application has a relative library path defined inside as ../lib64
. A dynamic
linker will find the required libsrt.so
file by this path: ../lib64/libsrt.so
.
This way the dynamic linkage will work even if /opt/srt/lib64
path isn't added
to the system paths in /etc/ld.so.conf
or in the LD_LIBRARY_PATH
environment
variable.
docs/BuildOptions.md
Outdated
`--enable-testing` (default: OFF) | ||
--------------------------------- | ||
Enables building SRT as a shared and/or static library, as required for your | ||
application. The only practical use is by disabling one of them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
application. In practice, you would only disable one or the other
docs/BuildOptions.md
Outdated
|
||
Enables `#include <threadcheck.h>`, which implements `THREAD_*` macros" to | ||
support better thread debugging. This is used by one of dependent projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support better thread debugging. Included to support an existing project.
docs/BuildOptions.md
Outdated
|
||
When ON, this option enables unit tests, possibly with the download | ||
and installation of the Google test library in the build directory. The tests | ||
will be run as part of the build process. This is predicted for developers only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be run as part of the build process. This is intended for developers only.
docs/BuildOptions.md
Outdated
directory layout will be used for particular parts. As on all | ||
known build systems, this defaults to `/usr/local` on POSIX | ||
compatible systems. | ||
This is an alias to `--cmake-install-prefix`. This is the root directory for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an alias to the --cmake-install-prefix
variable that establishes the
root directory for installation, inside of which a GNU/POSIX compatible directory layout will be used. As on all known build systems, this defaults to /usr/local
on GNU/POSIX compatible systems, with lower level GNU/POSIX directories
created inside: /usr/local/bin
,/usr/local/lib
, etc.
docs/BuildOptions.md
Outdated
may give more chance to switch to the right thread at the time | ||
when it is expected to be revived. | ||
This option will cause more empty loop running, which may cause more CPU usage. | ||
Although when processing high bitrate streams the share of empty loop runs will decrease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind, however, that when processing high bitrate streams . . .
docs/BuildOptions.md
Outdated
|
||
Instead of `--with-compiler-prefix` you can use as well `--cmake-c-compiler` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of --with-compiler-prefix
you can use --cmake-c-compiler
docs/BuildOptions.md
Outdated
|
||
Instead of `--with-compiler-prefix` you can use as well `--cmake-c-compiler` | ||
and `--cmake-c++-compiler` options. This can be then thought of as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and --cmake-c++-compiler
options. This can be thought of as a
README.md
Outdated
@@ -41,6 +41,8 @@ As audio/video packets are streamed from a source to a destination device, SRT d | |||
* OpenSSL | |||
* Pthreads (for POSIX systems it's builtin, for Windows there's a library) | |||
|
|||
For detailed description of the build system and options, please [read](docs/BuildOptions.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For detailed description of the build system and options, please read BuildOptions.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Much better.
docs/BuildOptions.md
Outdated
availabe on some version of Windows, in which case you can turn this OFF, | ||
however at the expense of not being able to resolve IP address by name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
available on some versions of Windows, in which case you can turn this OFF.
When this option is OFF, however, IP addresses cannot be resolved by name,
docs/BuildOptions.md
Outdated
specification (all of `*_timedwait`) expect the absolute time value. | ||
A relative timeout value can be then only specified by adding it to | ||
the current time, which can be specified as either system or monotonic | ||
clock (which one, is configured in the resources used in the operation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clock (as configured in the resources used in the operation).
docs/BuildOptions.md
Outdated
IP address in such a response packet to 10.0.1.20 in the above example, | ||
as well as this address is first extracted from the incoming packet as the | ||
target address. This fixes the problem, as this will be interpreted by | ||
the caller peer correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IP address in such a response packet (e.g. to 10.0.1.20 in the above example).
This address is first extracted from the incoming packet as the target address,
which fixes the problem, as that address will be interpreted by the caller peer correctly.
Commenting on lines +237 to +240
docs/BuildOptions.md
Outdated
|
||
Encryption library to be used. Possible options for `<name>`: | ||
|
||
* openssl(default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- openssl (default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minior edits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've finished my review pass. No other comments at this time.
Fixes #885
Added build options description:
BuildOptions.md
.Added entry info in README.
Removed unnecessary description in CMakeLists.txt in comments; the new file is a more appropriate place for this description.
Fixed duplicated enable-unittests in
configure-data.tcl
.